<?
	$vid = intval($_REQUEST['vid']);
	$cidArray = getAllRows($TABLE_PREFIX."_category", "1 ORDER BY sort,title ASC", "cid", "title");

	if (fill($_REQUEST['title'])) {
		$SMARTY->assign("vacancy", $_REQUEST);

	} else if ($vid) {
		$vacancy = getOneRow($TABLE_PREFIX, "vid=$vid");

		$cid = $vacancy['cid'];
		$vacancy_type = $vacancy['vacancy_type'];
		$SMARTY->assign("vacancy", $vacancy);

	}

	$SMARTY->assign("table_prefix", $TABLE_PREFIX);

?>
